<?php defined('SYSPATH') or die('No direct script access.');?>
{template 'stourtravel/public/public_min_js'}
{php echo Common::getCss('base.css,base_new.css'); }
{php echo Common::getScript("choose.js,product_add.js,jquery.validate.js,DatePicker/WdatePicker.js"); }

<style>
    .container-page .item-hd{
        width: 70px !important;
    }
    .container-page .item-bd{
        padding-left: 75px !important;
    }
    .container-page .info-item-block
    {
        padding: 0 !important;
    }
 
</style>

<div class="container-page">
    <form id="submit_frm" padding_border=RekAAj >
    <ul class="info-item-block">
        <li>
            <span class="item-hd">退款金额：</span>
            <div class="item-bd">
                <span class="item-text pl-5 pr-5 c-999">{Currency_Tool::symbol()}{$info['pay_price']}</span>
            </div>
        </li>
        <li>
            <span class="item-hd">手续费：</span>
            <div class="item-bd">
                <input type="text" class="input-text w100 reset-input" id="refund_cost" name="refund_cost" value="{$info['refund_cost']}">
            </div>
        </li>

    </ul>
    <input type="hidden" id="ordersn" value="{$info['ordersn']}">
    </div>
    </form>
    <div class="clearfix text-c mt-20">
        <a href="javascript:;" id="cancel-btn" class="btn btn-grey-outline  radius">稍后退款</a>
        <a href="javascript:;" class="btn btn-primary radius ml-10">马上退款</a>
    </div>
</div>
<script>
    $(function () {

        //确定
        $('.btn-primary').click(function () {




            var payprice = parseFloat("{$info['pay_price']}");
            var ordersn = $("#ordersn").val();
            var refund_cost = parseFloat($("#refund_cost").val());


            if(refund_cost>0 && refund_cost>payprice)
            {
                ST.Util.showMsg('请填写正确的手续费',5,1000);
                return false;
            }

            var data = {ordersn:ordersn,refund_cost:refund_cost};
            ST.Util.responseDialog(data,true);
        });
        //取消
        $('#cancel-btn').click(function () {
            var data = $('#submit_frm').serialize();
            ST.Util.closeDialog();
        })



    })

</script>